#pragma once
#include<iostream>
#include<atomic>
using namespace std;

class SeqStamp{
    atomic_int64_t seqNum;

    void setSeqNum(const int64_t& num){
        seqNum.store(num);
    }

public:

    SeqStamp(){
        setSeqNum(0);
    }

    int64_t getSeqStamp(){
        return seqNum.fetch_add(1);
    }

    void reSetSeqStamp(){
        setSeqNum(0);
    }

};
